<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge" >
  <link rel="dns-prefetch" href="http://yoursite.com">
  <title>使用hexo搭建个人博客 | Jakie13个人博客</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="下载安装hexo安装git下载 msysgit 并执行即可完成安装。地址：http://msysgit.github.io/
安装Node.js在 Windows 环境下安装 Node.js 非常简单，仅须下载安装文件并执行即可完成安装。地址：http://nodejs.org/
安装hexo利用 npm 命令即可安装。（在任意位置点击鼠标右键，选择Git bash）命令： npm install">
<meta property="og:type" content="article">
<meta property="og:title" content="使用hexo搭建个人博客">
<meta property="og:url" content="http://yoursite.com/2016/12/08/使用hexo搭建个人博客/index.html">
<meta property="og:site_name" content="Jakie13个人博客">
<meta property="og:description" content="下载安装hexo安装git下载 msysgit 并执行即可完成安装。地址：http://msysgit.github.io/
安装Node.js在 Windows 环境下安装 Node.js 非常简单，仅须下载安装文件并执行即可完成安装。地址：http://nodejs.org/
安装hexo利用 npm 命令即可安装。（在任意位置点击鼠标右键，选择Git bash）命令： npm install">
<meta property="og:image" content="http://ohsk3zt5q.bkt.clouddn.com/blog/hexo/2016-12-8-001.jpg">
<meta property="og:image" content="http://ohsk3zt5q.bkt.clouddn.com/blog/hexo/2016-12-8-002.jpg">
<meta property="og:image" content="http://ohsk3zt5q.bkt.clouddn.com/blog/hexo/2016-12-8-003.jpg">
<meta property="og:image" content="http://ohsk3zt5q.bkt.clouddn.com/blog/hexo/2016-12-8-004.jpg">
<meta property="og:image" content="http://ohsk3zt5q.bkt.clouddn.com/blog/hexo/2016-12-8-005.jpg">
<meta property="og:image" content="http://ohsk3zt5q.bkt.clouddn.com/blog/hexo/2016-12-8-006.jpg">
<meta property="og:updated_time" content="2016-12-08T09:09:17.055Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="使用hexo搭建个人博客">
<meta name="twitter:description" content="下载安装hexo安装git下载 msysgit 并执行即可完成安装。地址：http://msysgit.github.io/
安装Node.js在 Windows 环境下安装 Node.js 非常简单，仅须下载安装文件并执行即可完成安装。地址：http://nodejs.org/
安装hexo利用 npm 命令即可安装。（在任意位置点击鼠标右键，选择Git bash）命令： npm install">
<meta name="twitter:image" content="http://ohsk3zt5q.bkt.clouddn.com/blog/hexo/2016-12-8-001.jpg">
  
    <link rel="alternative" href="/atom.xml" title="Jakie13个人博客" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  <link rel="stylesheet" href="/main.css?v=4.0.0.css">
  

</head>

<body>
  <div id="container" q-class="show:isCtnShow">
    <canvas id="anm-canvas" class="anm-canvas"></canvas>
    <div class="left-col" q-class="show:isShow">
      <div class="overlay"></div>
<div class="intrude-less">
	<header id="header" class="inner">
		<a href="/" class="profilepic">
			<img src="http://ohsk3zt5q.bkt.clouddn.com/head_image.JPG" class="js-avatar">
		</a>

		<hgroup>
		  <h1 class="header-author"><a href="/">Jakie13</a></h1>
		</hgroup>

		

		<nav class="header-menu">
			<ul>
			
				<li><a href="/">主页</a></li>
	        
				<li><a href="/tags/随笔/">随笔</a></li>
	        
			</ul>
		</nav>
		<nav class="header-smart-menu">
	        
    		
    			
    			<a data-idx="0" q-on="click: openSlider(e, 'innerArchive')" href="javascript:void(0)">所有文章</a>
    			
    			
            
    			
            
    			
    			<a data-idx="1" q-on="click: openSlider(e, 'aboutme')" href="javascript:void(0)">关于我</a>
    			
    			
            
		</nav>
		<nav class="header-nav">
			<div class="social">
				
					<a class="github" target="_blank" href="https://github.com/jakie13" title="github"><i class="icon-github"></i></a>
		        
					<a class="mail" target="_blank" href="mailto:1334919800@qq.com" title="mail"><i class="icon-mail"></i></a>
		        
			</div>
		</nav>
	</header>		
</div>

    </div>
    <div class="mid-col" q-class="show:isShow,hide:isShow|isFalse">
      <nav id="mobile-nav">
  	<div class="overlay">
  		<div class="slider-trigger"><i class="icon-sort"></i></div>
  		<h1 class="header-author js-mobile-header hide">Jakie13</h1>
  	</div>
	<div class="intrude-less">
		<header id="header" class="inner">
			<div class="profilepic">
				<img src="http://ohsk3zt5q.bkt.clouddn.com/head_image.JPG" class="js-avatar">
			</div>
			<hgroup>
			  <h1 class="header-author">Jakie13</h1>
			</hgroup>
			
			<nav class="header-menu">
				<ul>
				
					<li><a href="/">主页</a></li>
		        
					<li><a href="/tags/随笔/">随笔</a></li>
		        
		        
		        	<li><a href="/archives/">所有文章</a></li>
		        
				</ul>
			</nav>
			<nav class="header-nav">
				<div class="social">
					
						<a class="github" target="_blank" href="https://github.com/jakie13" title="github"><i class="icon-github"></i></a>
			        
						<a class="mail" target="_blank" href="mailto:1334919800@qq.com" title="mail"><i class="icon-mail"></i></a>
			        
				</div>
			</nav>
		</header>				
	</div>
</nav>

      <div id="wrapper" class="body-wrap">
        <div class="menu-l">
          <div class="canvas-wrap">
            <canvas data-colors="#eaeaea" data-sectionHeight="100" data-contentId="js-content" id="myCanvas1" class="anm-canvas"></canvas>
          </div>
          <div id="js-content" class="content-ll">
            <article id="post-使用hexo搭建个人博客" class="article article-type-post " itemscope itemprop="blogPost">
  <div class="article-inner">
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      使用hexo搭建个人博客
    </h1>
  

        <a href="/2016/12/08/使用hexo搭建个人博客/" class="archive-article-date">
  	<time datetime="2016-12-08T07:33:56.000Z" itemprop="datePublished"><i class="icon-calendar icon"></i>2016-12-08</time>
</a>
      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <h1 id="下载安装hexo"><a href="#下载安装hexo" class="headerlink" title="下载安装hexo"></a>下载安装hexo</h1><h2 id="安装git"><a href="#安装git" class="headerlink" title="安装git"></a>安装git</h2><p>下载 msysgit 并执行即可完成安装。<br>地址：<a href="http://msysgit.github.io/" target="_blank" rel="external">http://msysgit.github.io/</a></p>
<h2 id="安装Node-js"><a href="#安装Node-js" class="headerlink" title="安装Node.js"></a>安装Node.js</h2><p>在 Windows 环境下安装 Node.js 非常简单，仅须下载安装文件并执行即可完成安装。<br>地址：<a href="http://nodejs.org/" target="_blank" rel="external">http://nodejs.org/</a></p>
<h2 id="安装hexo"><a href="#安装hexo" class="headerlink" title="安装hexo"></a>安装hexo</h2><p>利用 npm 命令即可安装。（在任意位置点击鼠标右键，选择Git bash）<br>命令： <code>npm install -g hexo</code><br><img src="http://ohsk3zt5q.bkt.clouddn.com/blog/hexo/2016-12-8-001.jpg" alt="1">  </p>
<h2 id="创建hexo文件夹"><a href="#创建hexo文件夹" class="headerlink" title="创建hexo文件夹"></a>创建hexo文件夹</h2><p>安装完成后，在你喜爱的文件夹下（如H:\hexo），执行以下指令(在H:\hexo内点击鼠标右键，选择Git bash)，Hexo 即会自动在目标文件夹建立网站所需要的所有文件。<br>执行命令： <code>hexo init</code><br><img src="http://ohsk3zt5q.bkt.clouddn.com/blog/hexo/2016-12-8-002.jpg" alt="2">  </p>
<h2 id="安装依赖包"><a href="#安装依赖包" class="headerlink" title="安装依赖包"></a>安装依赖包</h2><p>执行命令：<code>npm install</code><br><img src="http://ohsk3zt5q.bkt.clouddn.com/blog/hexo/2016-12-8-003.jpg" alt="3">  </p>
<h1 id="本地查看"><a href="#本地查看" class="headerlink" title="本地查看"></a>本地查看</h1><p>现在我们已经搭建起本地的hexo博客了，执行以下命令(在H:\hexo)，然后到浏览器输入localhost:4000看看。<br>执行命令：<br><code>hexo generate</code><br><code>hexo server</code><br><img src="http://ohsk3zt5q.bkt.clouddn.com/blog/hexo/2016-12-8-004.jpg" alt="4"><br>ps:Ctrl + C停止本地服务<br>初始界面：<br><img src="http://ohsk3zt5q.bkt.clouddn.com/blog/hexo/2016-12-8-005.jpg" alt="5"></p>
<h1 id="关联github"><a href="#关联github" class="headerlink" title="关联github"></a>关联github</h1><h2 id="创建页面仓库"><a href="#创建页面仓库" class="headerlink" title="创建页面仓库"></a>创建页面仓库</h2><p>这个仓库的名字需要和你的账号对应，格式: yourname.github.io<br>输入基本信息，然后点击创建仓库.</p>
<h2 id="建立Repository"><a href="#建立Repository" class="headerlink" title="建立Repository"></a>建立Repository</h2><p>使用_config.yml文件，来建立关联.<br>命令：<code>vim _config.yml</code><br>翻到最下面，改成我这样子的<br><img src="http://ohsk3zt5q.bkt.clouddn.com/blog/hexo/2016-12-8-006.jpg" alt="6"><br>ps:vim编辑后怎么退出 – esc后输入：号wq回车。具体可自行百度vim保存退出的几种方式<br>然后执行命令：<br><code>npm install hexo-deployer-git --save</code><br>然后，执行配置命令：<br><code>hexo deploy</code>  </p>
<h2 id="部署步骤"><a href="#部署步骤" class="headerlink" title="部署步骤"></a>部署步骤</h2><p>每次部署的步骤，可按以下三步来进行。<br><code>hexo clean</code><br><code>hexo generate</code><br><code>hexo deploy</code>  </p>
<h1 id="常用命令"><a href="#常用命令" class="headerlink" title="常用命令"></a>常用命令</h1><p><code>hexo new&quot;postName&quot;</code> #新建文章<br><code>hexo new page&quot;pageName&quot;</code> #新建页面<br><code>hexo generate</code> #生成静态页面至public目录<br><code>hexo server</code> #开启预览访问端口（默认端口4000，’ctrl + c’关闭server）<br><code>hexo deploy</code> #将.deploy目录部署到GitHub<br><code>hexo help</code> # 查看帮助<br><code>hexo version</code> #查看Hexo的版本  </p>

      

      
    </div>
    <div class="article-info article-info-index">
      
      
	<div class="article-tag tagcloud">
		<i class="icon-price-tags"></i>
		<ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/hexo-blog/">hexo blog</a></li></ul>
	</div>

      

      

      
        
<div class="share-btn share-icons tooltip-left">
  <div class="tooltip tooltip-east">
    <span class="tooltip-item">
      <a href="javascript:;" class="share-sns share-outer">
        <i class="icon icon-share"></i>
      </a>
    </span>
    <span class="tooltip-content">
      <div class="share-wrap">
        <div class="share-icons">
          <a class="weibo share-sns" href="javascript:;" data-type="weibo">
            <i class="icon icon-weibo"></i>
          </a>
          <a class="weixin share-sns wxFab" href="javascript:;" data-type="weixin">
            <i class="icon icon-weixin"></i>
          </a>
          <a class="qq share-sns" href="javascript:;" data-type="qq">
            <i class="icon icon-qq"></i>
          </a>
          <a class="douban share-sns" href="javascript:;" data-type="douban">
            <i class="icon icon-douban"></i>
          </a>
          <a class="qzone share-sns" href="javascript:;" data-type="qzone">
            <i class="icon icon-qzone"></i>
          </a>
          <a class="facebook share-sns" href="javascript:;" data-type="facebook">
            <i class="icon icon-facebook"></i>
          </a>
          <a class="twitter share-sns" href="javascript:;" data-type="twitter">
            <i class="icon icon-twitter"></i>
          </a>
          <a class="google share-sns" href="javascript:;" data-type="google">
            <i class="icon icon-google"></i>
          </a>
        </div>
      </div>
    </span>
  </div>
</div>

<div class="page-modal wx-share js-wx-box">
    <a class="close js-modal-close" href="javascript:;"><i class="icon icon-close"></i></a>
    <p>扫一扫，分享到微信</p>
    <div class="wx-qrcode">
      <img src="http://s.jiathis.com/qrcode.php?url=http://yoursite.com/2016/12/08/使用hexo搭建个人博客/" alt="微信分享二维码">
    </div>
</div>

<div class="mask js-mask"></div>
      
      <div class="clearfix"></div>
    </div>
  </div>
</article>

  
<nav id="article-nav">
  
    <a href="/2016/12/13/eclipse安装R语言插件/" id="article-nav-newer" class="article-nav-link-wrap">
      <i class="icon-circle-left"></i>
      <div class="article-nav-title">
        
          eclipse安装R语言插件
        
      </div>
    </a>
  
  
    <a href="/2016/12/08/blog使用七牛云作为图床/" id="article-nav-older" class="article-nav-link-wrap">
      <div class="article-nav-title">blog使用七牛云作为图床</div>
      <i class="icon-circle-right"></i>
    </a>
  
</nav>









          </div>
        </div>
      </div>
      <footer id="footer">
  <div class="outer">
    <div id="footer-info">
    	<div class="footer-left">
    		&copy; 2016 Jakie13
    	</div>
      	<div class="footer-right">
      		<a href="http://hexo.io/" target="_blank">Hexo</a>  Theme <a href="https://github.com/litten/hexo-theme-yilia" target="_blank">Yilia</a> by Litten
      	</div>
    </div>
  </div>
</footer>
    </div>
    <script>
	var yiliaConfig = {
		mathjax: false,
		isHome: false,
		isPost: true,
		isArchive: false,
		isTag: false,
		isCategory: false,
		open_in_new: false,
		root: "/",
		innerArchive: true
	}
</script>

<script src="/./main.js?v=4.0.0.js"></script>


    
<div class="tools-col" q-class="show:isShow,hide:isShow|isFalse" q-on="click:stop(e)">
  <div class="tools-wrap">
    
    	<section class="tools-section tools-section-all" q-show="innerArchive">
        <div class="search-wrap">
          <input class="search-ipt" q-model="search" type="text" placeholder="find something…">
          <i class="icon-search icon" q-show="search|isEmptyStr"></i>
          <i class="icon-close icon" q-show="search|isNotEmptyStr" q-on="click:clearChose(e)"></i>
        </div>
        <div class="widget tagcloud search-tag">
          <p class="search-tag-wording">tag:</p>
          <label class="search-switch">
            <input type="checkbox" q-on="click:toggleTag(e)" q-attr="checked:showTags">
          </label>
          <ul class="article-tag-list" q-show="showTags">
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)">R语言</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)">七牛云 图床</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)">eclipse R语言</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)">hexo blog</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)">sonarqube sonarscanner sonarlint</a>
              </li>
             
              <li class="article-tag-list-item">
                <a href="javascript:void(0)">Markdown</a>
              </li>
            
            <div class="clearfix"></div>
          </ul>
        </div>
        <ul class="search-ul">
          <p q-show="jsonFail" style="padding: 20px; font-size: 12px;">
            缺失模块。<br/>1、在博客根目录（注意不是yilia根目录）执行以下命令：<br/> npm i hexo-generator-json-content --save<br/><br/>
            2、在根目录_config.yml里添加配置：
<pre style="font-size: 12px;" q-show="jsonFail">
  jsonContent:
    meta: false
    pages: false
    posts:
      title: true
      date: true
      path: true
      text: true
      raw: false
      content: false
      slug: false
      updated: false
      comments: false
      link: false
      permalink: false
      excerpt: false
      categories: false
      tags: true
</pre>
          </p>
          <li class="search-li" q-repeat="items" q-show="isShow">
            <a q-attr="href:path|urlformat" class="search-title"><i class="icon-quo-left icon"></i><span q-text="title"></span></a>
            <p class="search-time">
              <i class="icon-calendar icon"></i>
              <span q-text="date|dateformat"></span>
            </p>
            <p class="search-tag">
              <i class="icon-price-tags icon"></i>
              <span q-repeat="tags" q-on="click:choseTag(e, name)" q-text="name|tagformat"></span>
            </p>
          </li>
        </ul>
    	</section>
    

    

    
    	<section class="tools-section tools-section-me" q-show="aboutme">
  	  	
  	  		<div class="aboutme-wrap" id="js-aboutme">新人一枚&lt;br&gt;欢迎讨论&lt;br&gt;&lt;br&gt;</div>
  	  	
    	</section>
    
  </div>
  
</div>
    <!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">

    <!-- Background of PhotoSwipe. 
         It's a separate element as animating opacity is faster than rgba(). -->
    <div class="pswp__bg"></div>

    <!-- Slides wrapper with overflow:hidden. -->
    <div class="pswp__scroll-wrap">

        <!-- Container that holds slides. 
            PhotoSwipe keeps only 3 of them in the DOM to save memory.
            Don't modify these 3 pswp__item elements, data is added later on. -->
        <div class="pswp__container">
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
        </div>

        <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
        <div class="pswp__ui pswp__ui--hidden">

            <div class="pswp__top-bar">

                <!--  Controls are self-explanatory. Order can be changed. -->

                <div class="pswp__counter"></div>

                <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>

                <button class="pswp__button pswp__button--share" style="display:none" title="Share"></button>

                <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>

                <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>

                <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
                <!-- element will get class pswp__preloader--active when preloader is running -->
                <div class="pswp__preloader">
                    <div class="pswp__preloader__icn">
                      <div class="pswp__preloader__cut">
                        <div class="pswp__preloader__donut"></div>
                      </div>
                    </div>
                </div>
            </div>

            <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                <div class="pswp__share-tooltip"></div> 
            </div>

            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
            </button>

            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
            </button>

            <div class="pswp__caption">
                <div class="pswp__caption__center"></div>
            </div>

        </div>

    </div>

</div>
  </div>
</body>
</html>